import React from 'react';

import ArgFunc from './PageArgFunc';
import PageList from './PageListDemo';
import PageNavi from './PageNavi';
import PageCommunicate from './PageCommunicate';
// import PageNativeUI         from './PageNativeUI';
import PageNet from './PageNet';
import PageStorage from './PageStorage';
import PageAnimateList from './PageAnimateList';
import PageModal from './PageModal';
import PageVerCheck from './PageVerCheck';
import Ryhc from '../../ryhc/Ryhc';
import PageCtrl from "./PageCtrl";
import * as Color from "../constant/Color";
import RippleButtonBorderless from "../widget/btn/RippleButtonBorderless";
import PageNativeUI from "./PageNativeUI";
import Login from "../widget/frame/Login";
import FindBackPwd from "../widget/frame/FindBackPwd";
import ChangePwd from "../widget/frame/ChangePwd";

export class PageBean {
    key                 : string;   // key
    screen              : Object;   // stack
    headerTitle         : string;   // headerTitle(如果设置了title属性,那么这个导航栏和标签栏的title就会变成一样的，所以不推荐)
    navigationOptions   : Object;   // navigationOptions
    msgNew              : number;   //
}

/** 这里的数据会在首页的功能列表上面显示（只是全部stack的一部分） */
export default class Page{
    static menus: Array<PageBean> = [
        {
            key: 'ChangePwd',
            screen: ChangePwd,
            headerTitle: '修改密码',
        },
        {
            key: 'FindBackPwd',
            screen: FindBackPwd,
            headerTitle: '找回密码',
        },
        {
            key: 'Login',
            screen: Login,
            headerTitle: '登录',
        },
        {
            key: 'PageCtrl',
            screen: PageCtrl,
            headerTitle: '控件',
        },
        {
            key: 'ArgFunc',
            screen: ArgFunc,
            headerTitle: '方法调用测试',
        },
        {
            key: 'PageList',
            screen:PageList,
            headerTitle: '列表',
        },
        {
            key: 'PageAnimateList',
            screen:PageAnimateList,
            headerTitle: '动画',
        },
        {
            key: 'PageNavi',
            screen:PageNavi,
            headerTitle: '页面切换',
            navigationOptions: {        // 属性值(为一种对象)---> (属性值(为一种对象)---> 属性值)
                headerTitle: '页面切换',
                headerRight:(
                    <RippleButtonBorderless style={{paddingLeft:8, paddingRight:8, color:Color.black}} disabled={false} title={'确定'} onPress={()=>{}}/>
                ),
                // headerLeft:(
                //     <Text onPress={() => {}}> Left </Text>
                // ),
                headerTintColor:Color.black,    // 整个头部的颜色
                headerTitleStyle: {flex: 1, fontSize: 18, backgroundColor: Color.lightGray, textAlign:'center',}, // 头部的标题style
                headerStyle: {height: 48, backgroundColor: '#fff'},
            },
        },
        {
            key: 'PageCommunicate',
            screen:PageCommunicate,
            headerTitle: '与原生方法(Android)交互',
        },
        {
            key: 'PageNativeUI',
            screen:PageNativeUI,
            headerTitle: 'PageNativeUI',
        },
        {
            key: 'PageNet',
            screen:PageNet,
            headerTitle: '网络',
        },
        {
            key: 'PageStorage',
            screen:PageStorage,
            headerTitle: '存储',
        },
        {
            key: 'PageModal',
            screen:PageModal,
            headerTitle: 'Modal',
        },
        {
            key: 'RYHC',
            screen:Ryhc,
            headerTitle: '人员核查',
        },
        {
            key: 'PageVerCheck',
            screen:PageVerCheck,
            headerTitle: '热更新',
        },
    ];

    /** 返回的stack
     *  1. 是动态添加的Stack
     *  2. 是首页demo列表项
     */
    static getPages(){
        return this.menus;
    }
}

